#include "ArduinoJson-v6.17.2.h"
#include <stdio.h>
int main(int argc, char const *argv[])
{
  DynamicJsonDocument doc(64);
  std::string msg = "{\"R\":50,\"G\":100,\"B\":150}";

  deserializeJson(doc, msg);
  int R = doc["R"]; // 50
  int G = doc["G"]; // 100
  int B = doc["B"]; // 150

  printf("%s\nR:%d\n", msg.c_str(), R);
  return 0;
}
